package cn.edu.ctbu.scoremg.controller;

import cn.edu.ctbu.scoremg.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/teacher")
public class TeacherController {

    @Autowired
    private TeacherService teacherService;

    @GetMapping("/list")
    public String getList() {
        // 如果需要可以添加获取教师列表的逻辑
        // List<Teacher> teachers = teacherService.getAll();
        // model.addAttribute("teachers", teachers);
        return "/teacher/list";
    }
    @GetMapping("/list0")
    public String getList0() {
        // 如果需要可以添加获取教师列表的逻辑
        // List<Teacher> teachers = teacherService.getAll();
        // model.addAttribute("teachers", teachers);
        return "/teacher/list0";
        //此时教师登录时
    }
// 在TeacherController中
//@GetMapping("/index")
//public String teacherIndex() {
//    return "/teacher/index";
//}

}